<template>
        <h3>预警管理</h3>
  <el-divider />
  <el-table :data="cautionList">
    <el-table-column width="50px" type="index" />

    
    <el-table-column prop="cautionType" label="预警类型" width="300px" />
    
    <el-table-column prop="cautionNum" label="预警数量"  />
    

    <el-table-column prop="createTime" label="创建时间" width="180px" />
    <el-table-column prop="updateTime" label="更新时间" width="180px" />
    <el-table-column label="操作" width="180px">
      <template #default="scope">
        <el-button type="warning" size="small">编辑</el-button>
        <el-button
          type="danger"
          size="small"
          >删除</el-button
        >
      </template>
    </el-table-column>
  </el-table>
</template>
    
<script setup >
    import http from "../axios";

import { onMounted, ref } from "vue";
const cautionList = ref([])

onMounted(()=>{
        caution_list();
})

const caution_list = () =>{
        http.get('/caution/list').then(resp=>{
                console.log(resp);
                cautionList.value = resp.data.data;
        })
}
</script>
    
<style>
    
</style>